package com.robert.demo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * OperLogInfo:
 *
 * @author zhaoshengtao
 * @date 2024/01/05
 */
@TableName(value ="opt_log")
@Data
@AllArgsConstructor
@Builder
@NoArgsConstructor
@ToString
public class OptLogInfo implements Serializable {

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private Integer userId;

    private String name;

    private String reqUrl;

    private String memo;

    private String state; //1. 成功 2.异常

    private String reqParams;

    private String result;

    private String reqIp;

    private String version;

    private String requestId;

    private Long takeTime;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    private String ext1;
    private String ext2;
    private String ext3;



}
